package com.bw.ppjoke.splash;

import android.view.View;

import androidx.lifecycle.Observer;
import androidx.viewbinding.ViewBinding;

import com.blankj.utilcode.util.ToastUtils;
import com.bw.common.mvvm.BaseActivity;
import com.bw.ppjoke.databinding.ActivitySplashBinding;

public class SplashActivity extends BaseActivity<ActivitySplashBinding,SplashViewModel> {

    @Override
    public View bindLayout() {
        return v.getRoot();
    }

    @Override
    public ViewBinding initBinding() {
        ActivitySplashBinding binding = ActivitySplashBinding.inflate(inflater);
        return binding;
    }

    @Override
    public void initView() {

    }

    @Override
    public void initData() {
        vm.dataBus.observe(this, new Observer<String>() {
            @Override
            public void onChanged(String s) {
                v.splashTimeTv.setText(s);
                if (s.equals("0s")){
                    ToastUtils.showShort("跳转界面");
                }
            }
        });
    }

}
